<header class="navbar navbar-static-top bs-docs-nav header--fixed" id="topbanner" role="banner" >
  <div class="gpwrap container">
    <div class="navbar-header">
        <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
        <span class="sr-only">切换菜单</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a href="/"><img class="logo" src="__IMG__/logo.png"/></a>
    </div>
    <nav class="collapse navbar-collapse bs-navbar-collapse">
      <ul class="nav navbar-nav">
        <think:nav name="nav">
          <li><a href="{$nav.url|get_nav_url}" target="<eq name='nav.target' value='1'>_blank<else/>_self</eq>">{$nav.title}</a></li>
        </think:nav>
      </ul>
      <ul class="nav navbar-nav navbar-right">     
        <if condition="is_login()">
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{:get_media_icon(session('user_auth.media_type'))}{:session('user_auth.username')}<span class="caret"></span></a>
            <ul class="dropdown-menu" role="menu">
              <li><a href="{:U('User/profile')}">用户中心</a></li>
              <li class="divider"></li>
              <li><a href="{:U('User/logout')}">退出账户</a></li>
            </ul>
          </li>
        <else/>
            <li><a href="{:U('User/login')}">登录</a></li>
            <li><a href="{:U('User/register')}">注册</a></li>
        </if>
      </ul>
    </nav>
  </div>
</header>
<div style="height:50px;">
</div>